//
//  AppDelegate+BaMarryCall.m
//  BaseProject
//
//  Created by 王盼盼 on 2024/9/12.
//  Copyright © 2024 wangpanpan. All rights reserved.
//

#import "AppDelegate+BaMarryCall.h"

@implementation AppDelegate (BaMarryCall)
- (BOOL)isBaMarryCall:(NSURL *)url {
    return [url.scheme isEqualToString:@"bamarrycall"];
}
- (BOOL)application_baMarryCall:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
    // bamarrycall://param?eventClickId=28&eventSellerId=10086
    NSString *urlStr = [url absoluteString];
    urlStr = [Utilities stringByReplacingPercentEscapesUsingEncoding:urlStr];
    NSString *parameter = [urlStr stringByReplacingOccurrencesOfString:@"bamarrycall://param?" withString:@""];
    NSDictionary *dic = [Utilities getUrlParam:parameter];
    HomeADItemEventModel *model = [HomeADItemEventModel modelWithDictionary:dic];
    [[TT_JumpManager sharedManager]jumpWithModel:model completion:^(BOOL success, NSString * _Nonnull message) {
            
    }];
    return YES;
}
@end
